﻿@model PlmPersonnelinfoViewModel
@{
    Layout = null;
    ViewBag.Title = "施工人员列表";
}

@using (Html.BeginForm("SplitPage", "PlmConstructionPersonnel", null, FormMethod.Post, new { id = "pagerForm", onsubmit = "return divSearch(this,'rygl_sgry_list');" }))
{
    <input type="hidden" name="pageNum" value="1" />
    <input type="hidden" name="numPerPage" value="@(ViewBag.numPerPage)" />
    <ul class="searchBar">
        <li>
            <input type="hidden" name="input_section" value="@(ViewBag.Section)" />
            <span>姓名：</span>
            <input type="text" name="iput_name" value="@(ViewBag.iput_name)" />
        </li>
        <li><span>职位：</span>
            <input type="text" name="iput_post" value="@(ViewBag.iput_post)" />
        </li>
        <li><span>职称：</span>
            <input type="text" name="iput_professsional" value="@(ViewBag.iput_professsional)" />
        </li>
        <li>
            <button type="submit" class="btn btn-success btn-xs">
                搜索</button>
        </li>
    </ul>
}
<div class="panelBar" style="border-top:none;">
    <ul class="toolBar">
        <li>@Html.PermissionButton("PersonnelLog.PlmConstructionPersonnel.Create", "PersonnelLog_PlmConstructionPersonnel_Create", "add", Url.Action("ConstructionPersonnelAdd", "PlmConstructionPersonnel", new { Section = HttpUtility.UrlEncode(ViewBag.Section,System.Text.Encoding.GetEncoding("UTF-8")) }), "", "dialog", "添加", "true", "480", "480", "添加")</li>
        <li>
            @Html.PermissionButton("PersonnelLog.PlmConstructionPersonnel.Delete", "PersonnelLog_PlmConstructionPersonnel_Delete",
                    Url.Action("ConstructionPersonnelDelete", "PlmConstructionPersonnel", new { id = "{ids}" }),
                    "删除",
                    new Dictionary<string, object>
                    {
                        {"class","delete"} ,{"target","ajaxTodo"},{"title","确定要删除该条记录吗?"},{"callback","function(){$('#pagerForm', navTab.getCurrentPanel()).submit();}"}
                    })
        </li>
        <li>@Html.PermissionButton("PersonnelLog.PlmConstructionPersonnel.Edit", "PersonnelLog_PlmConstructionPersonnel_Edit",
                    Url.Action("ConstructionPersonnelEdit", "PlmConstructionPersonnel", new { id = "{ids}" }),
                    "修改",
                    new Dictionary<string, object>
                    {
                        {"class","edit"} ,{"mask","true"},{"target","dialog"},{"width","480"},{"height","480"},{"rel","dlg_aqsc_edit"},{"warn","请选择一条信息"}
                    })
        </li>
        <li>
            @Html.PermissionButton("PersonnelLog.PlmConstructionPersonnel.Detail", "PersonnelLog_PlmConstructionPersonnel_Detail",
                    Url.Action("ConstructionPersonnelDetail", "PlmConstructionPersonnel", new { id = "{ids}" }),
                    "查看",
                    new Dictionary<string, object>
                    {
                        {"class","detail"},{"rel","rygl_jlry_detail"} ,{"warn","请选择一条信息！"},{"target","dialog"},{"mask","true"},{"width","560"},{"height","480"}
                    })
        </li>
        <li class="line">line</li>
        <li>
            @Html.PermissionButton("PersonnelLog.PlmConstructionPersonnel.Download", "PersonnelLog_PlmConstructionPersonnel_Download",
                    "../../Areas/PersonnelLog/Upload/施工人员信息.xls",
                    "模板",
                    new Dictionary<string, object>
                    {
                        {"class","download"},{"targettype","navTab"} ,{"title","导入模板下载"}
                    })
        </li>
        <li>
            @Html.PermissionButton("PersonnelLog.PlmConstructionPersonnel.Input", "PersonnelLog_PlmConstructionPersonnel_Input",
                    Url.Action("Index", "Import", new { url = "/PersonnelLog/PlmConstructionPersonnel/ImportExcelFile", Section = ViewBag.Section }),
                    "导入",
                    new Dictionary<string, object>
                    {
                        {"class","input"},{"rel","rygl_sgry_input"} ,{"lookupgroup","attachment"},{"mask","true"},{"width","320"},{"height","220"},{"title","导入EXCEL"}
                    })
        </li>
        <li>
            @Html.PermissionButton("PersonnelLog.PlmConstructionPersonnel.Export", "PersonnelLog_PlmConstructionPersonnel_Export",
                    Url.Action("Excel", "PlmConstructionPersonnel", new { Section = ViewBag.Section }),
                    "导出",
                    new Dictionary<string, object>
                    {
                        {"class","export"},{"targettype","navTab"} ,{"title","导出EXCEL"}
                    })
        </li>
    </ul>
</div>
<table class="table" width="100%" layouth="122" nowraptd="false" rel="rygl_sgry_list">
    <thead>
        <tr>
            <th width="22" style="display:none">
                <input type="checkbox" group="ids" class="checkboxCtrl">
            </th>
            <th align="center">
                序号
            </th>
            <th align="center">
                姓名
            </th>
            <th align="center">
                性别
            </th>
            <th align="center">
                年龄
            </th>
            @* <th align="center">身份证号</th>*@
            <th align="center">
                职位
            </th>
             <th align="center">职称</th>
            <th align="center">
                联系电话
            </th>
            <th align="center">
                所属施工单位
            </th>
            @*  <th align="center">邮箱</th>*@ @*  <th align="center">操作</th>*@
        </tr>
    </thead>
    <tbody>
        @{ int num = (ViewBag.pageNum - 1) * ViewBag.numPerPage;}
        @foreach (var item in Model.ThePersonnelinfoList)
        {
            num += 1;
            <tr target="ids" rel="@item.Pi_ID">
                <td style="display:none">
                    <input name="ids" value="@item.Pi_ID" type="checkbox">
                </td>
                <td>@num
                </td>
                <td>
                    <a title="查看施工人员详细信息" href="@Url.Action("ConstructionPersonnelDetail", "PlmConstructionPersonnel", new { id = @item.Pi_ID })" mask="true" target="dialog" width="550" height="420">@item.Pi_Name</a>
                </td>
                <td>@item.Pi_Sex
                </td>
                <td>@item.Pi_Age
                </td>
                @*<td>@item.Pi_IDNo</td>*@
                <td>@item.Pi_Post
                </td>
                 <td>@item.Pi_Professional</td>
                <td>@item.Pi_Phone
                </td>                
                <td>@item.Pi_UnittName
                </td>
                @* <td>@item.Pi_Email</td>*@ @*  <td>
                    <a title="查看" target="navTab" href="@Url.Action("ConstructionPersonnelEdit", "PlmConstructionPersonnel", new { id=@item.Pi_ID })" class="btnLook">查看</a>
                    <a title="删除" target="ajaxTodo" href="@Url.Action("ConstructionPersonnelDelete", "PlmConstructionPersonnel",new{id=@item.Pi_ID})" class="btnDel">删除</a>
                    <a title="编辑" target="navTab" href="@Url.Action("ConstructionPersonnelEdit", "PlmConstructionPersonnel", new { id=@item.Pi_ID })" class="btnEdit">编辑</a>
                </td>*@
            </tr>
        }
    </tbody>
</table>
<div class="panelBar" style="border-bottom:none;">
    <div class="pages" style="float: right">
        <span>显示</span>
        <select class="comsplitpage" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value},'rygl_sgry_list')">
            <option value="10" @(ViewBag.numPerPage == 10 ? "selected='selected'" : "")>10</option>
                <option value="20" @(ViewBag.numPerPage == 20 ? "selected='selected'" : "")>20</option>
                <option value="50" @(ViewBag.numPerPage == 50 ? "selected='selected'" : "")>50</option>
        </select>
        <span>条，共@(ViewBag.pagenumshown)页,@(ViewBag.totalcount)条</span>
    </div>
    <div class="pagination" style="margin:0px;float:left; margin-left:35%" rel="rygl_sgry_list" totalcount="@(ViewBag.totalcount)" numperpage="@(ViewBag.numPerPage)" pagenumshown="10" currentpage="@(ViewBag.pageNum)">
    </div>
</div>
